package com.lcn.controller;

import com.lcn.base.BaseInfoProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/gateway")
public class TestController extends BaseInfoProperties {

    @GetMapping("/hello")
    public Object hello() {
        return "Hello World";
    }

    @GetMapping("/setString")
    public Object setString(String key, String value) {
        redis.set(key, value);
        return "SUCCESS";
    }

    @GetMapping("/getString")
    public Object getString(String key) {
        return redis.get(key);
    }

}
